package com.casstime.ec.cloud.meeting.web.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/error")
public class ErrorPageController {

	@RequestMapping("/{status}")
    public ModelAndView toPage(HttpServletRequest req, HttpServletResponse res,
    	@PathVariable("status") String status) throws Exception {
		
		ModelAndView view = new ModelAndView();
		view.addObject("status", status);
		view.setViewName("/error/error");
		
		return view;
    }
}
